<?php

/**
 * This file is part of the Pagizer package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @copyright   Copyright (c) 2010 Advisa (http://www.advisa.fr)
 * @author      Pagizer Core Team <team@pagizer.org>
 * @package     pagizer
 * @subpackage  website
 */

class m_website_views_block_front_FreeContentSuccessView extends m_backoffice_extends_View
{
	public function execute()
	{
		$templateEngine = $this->getTemplateEngine();

        $templateEngine->setDelimiter('{{','}}');
        
		if($this->getModel("preview") == "true" || !is_null($this->getModel("revisionId")))
		{
			$templateEngine->disableCache();
		}

        if(is_null($this->getModel("revisionId")))
        {
    		$templateEngine->addCacheDiscriminator($this->getModel("pageId").'_'.$this->getModel("contentId"));
            $templateEngine->setCacheGroup($this->getModel("lang")."|content|free");
        }
		
		$templateEngine->setModuleTemplate("website", "front/block/FreeContent.html");

		$templateEngine->assign("class", $this->getModel("class"));
		$templateEngine->assign("content", $this->getModel("content"));

		$templateEngine->renderDisplay();
	}
}